<SCRIPT type="text/javascript">
	var zNodes1 =[
		{ id:"export", pId:0, name:"报表导出文件", open:true, icon:"/assets/images/icon-file-closed.png", url:"/${orgi}/manage/file/export.html",target:"_self"}
	];
	
	$(document).ready(function(){
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "export", null));
	});

	function selectUser(){
		var id = $("input[name='userids']:checked").val();
		if(id==undefined){
			$("#userid").val("");
			$("#usernametext").html("任意");
			$("#username").val("");
		}else{
			$("#userid").val(id);
			$("#usernametext").html($("#username_td_"+id).html());
			$("#username").val($("#username_td_"+id).html());
		}
		
		
		closeR3ArtDialog();
	}
	function selectReport(){
		var id = $("input[name='reportids']:checked").val();
		if(id==undefined){
			$("#reportid").val("");
			$("#reportnametext").html("任意");
			$("#reportname").val("");
		}else{
			$("#reportid").val(id);
			$("#reportnametext").html($("#username_td_"+id).html());
			$("#reportname").val($("#username_td_"+id).html());
		}
		var treeObj = $.fn.zTree.getZTreeObj("zTree_report_dic_LIst");
		var nodes = treeObj.getCheckedNodes(true);
		if(nodes.length>0){
			var node = nodes[0];
			$("#dicid").val(node.id);
			$("#dicnametext").html(node.name);
			$("#dicname").val(node.name);
		}else{
			$("#dicid").val("");
			$("#dicnametext").html("任意");
			$("#dicname").val("");
		}
		closeR3ArtDialog();
	}
	function submitSearchForm(action){
		$("#beginNum").val($("#beginNumShow").val());
		$("#endNum").val($("#endNumShow").val());
		var reg = /^[0-9]*$/;
		if(reg.test($("#beginNum").val())&&reg.test($("#endNum").val())&&(parseInt($("#endNum").val())>=parseInt($("#beginNum").val()))){
			$("#action").val(action);
			$("#searchForm").submit();
		}else{
			alertMsg("请输入正确的页码信息！");
		}
	}	
</SCRIPT>
<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/manage/task/taskpassing.html">系统管理</a></li>
		<li class="bc_ithems"><a href="/${orgi}/manage/task/taskpassing.html">文件管理</a></li>
	</ul>
	<div style="float: right;line-height:30px;margin-right:10px;">
		目录：${storagepath!''} ，已使用空间：${(storagesize!0/1024/1024)?string('###,##0.0##')}kb，最大空间：${(storagemax!0/(1024*1024*1024))?string('###,##0.0##')}kb，文件数量：${(storagefiles!0)}，已导出文件：${exportFiles?size}，检查时间：${(lastcheck)?string('yyyy-MM-dd HH:mm:ss')}
	</div>
</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="task_title2">类型</div>
		<div class="ztree" id="zTree_adminLIst" style="height:120px;">
		
		</div>
		<div class="rs_layout_top" style="font-size: 12px" id="filterDiv">
		<form id="searchForm" action="/${orgi}/manage/file/index.html" method="post">	
		
			<input type="hidden" id="beginNum" name="beginNum" value="">
			<input type="hidden" id="endNum" name="endNum" value="">
			<input type="hidden" id="action" name="action" value="current">
			
			<div class="task_title2">过滤器</div>

			
			<div style="padding-left: 20px;padding-top: 10px;">
					
					<div style="margin-top: 10px;">
					<label><input type="radio" onclick="timeEnable()" checked="checked" style="float: left;" name="timeType" value="2">&nbsp;&nbsp;开始时间：</label>
						<div style="margin-left: 30px">
							<input class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'#F{$dp.$D(\'endTime\')}'})" <#if timeType??&&timeType=='1'>disabled="disabled"</#if>  id="beginTime" name="beginTime" style="margin-top: 5px;width:145px;" value="${beginTime!''}">
							<br>
							结束时间：<br><input class="Wdate" type="text" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'beginTime\')}'})" <#if timeType??&&timeType=='1'>disabled="disabled"</#if>  id="endTime" name="endTime" style="margin-top: 5px;width:145px;" value="${endTime!''}">
						</div>
					
					</div>
					
					
					<div style="margin-top: 10px;">
					用户：<span id="usernametext">${username!'任意'}<#if username??&&username==''>任意</#if></span>
						<div style="margin-left: 30px;">
							
							<input type="hidden" name="userid" id="userid" value="${userid!''}">
							<input type="hidden" name="username" id="username" value="${username!''}">
							<br>
							<i style="color: #0000CC;" data-toggle="ajax" id="newreport" href="/rivues/manage/role/userselect.html" data-width="750" title="选择用户">选择用户...</i>
						</div>
					
					</div>
					
					<div style="margin-top: 10px;">
					报表：<span id="reportnametext">${reportname!'任意'}<#if reportname??&&reportname==''>任意</#if></span><br><br>
					目录：<span id="dicnametext">${dicname!'任意'}<#if dicname??&&dicname==''>任意</#if></span>
						<div style="margin-left: 30px;">
							
							<input type="hidden" name="reportid" id="reportid" value="${reportid!''}">
							<input type="hidden" name="reportname" id="reportname" value="${reportname!''}">
							<input type="hidden" name="dicid" id="dicid" value="${dicid!''}">
							<input type="hidden" name="dicname" id="dicname" value="${dicname!''}">
							<br>
							<i style="color: #0000CC;" data-toggle="ajax" id="newreport" href="/${orgi}/user/report/pub/reportselect.html" data-width="750" title="选择报表">选择报表...</i>
						</div>
					
					</div>

			</div>
			<div style="text-align: center;margin-top: 10px;background: #ddd;padding: 5px 0px;">
				<input class="subButtonStyle" style="margin:0px auto;" type="submit" value="应用">
			</div>
			</form>
		</div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_center">
			
			<div class="tableScrollWrap">
					
				<table class="table_style_1">
					<thead>
						<tr>
							<th style="width:20px;">&nbsp;</th>
							<th><i class="verMidWrap">名称（目录）</i><i class="tbArrow"></i></th>
							<th><i class="minSize">执行时间</i><i class="tbArrow"></i></th>
							<th><i class="minSize">结束时间</i><i class="tbArrow"></i></th>
							<th><i class="minSize">导出时长</i><i class="tbArrow"></i></th>
							<th><i class="minSize">状态</i></th>
							<th><i class="minSize">总数据量</i><i class="tbArrow"></i></th>
							<th><i class="minSize">文件大小</i><i class="tbArrow"></i></th>
							<th><i class="minSize">执行人</i><i class="tbArrow"></i></th>
							<th><i class="minSize" style="width: 80px; text-align: center;">优先级</i><i class="tbArrow"></i></th>
							<th class="minSize">操作</th>
						</tr>
					</thead>
					<tbody>
						
						<#if exportFiles??>
						<#list exportFiles as job>
						<tr>
							<td>&nbsp;</td>
							<td><a href="javascript:void(0)"title="${job.name!'任务'}"><i class="icons_tablelist_task"></i>${job.name!''}</a></td>
							<td class="minSize">${job.nextfiretime?string("yyyy年MM月dd HH:mm:ss")}</td>
							<td class="minSize">${job.memo!''}</td>
							<td class="minSize">${job.orgi!''}</td>
							<td class="minSize"><#if job.metadata = true><font color="red">已过期</font><#else>已完成</#if></td>
							<td class="minSize">${job.usearea!''}</td>
							<td class="minSize">${(job.lastindex/1024/1024)?string('###,##0.00')}Mb</td>
							<td class="minSize">${job.username!''}（${job.nickname!''}）</td>
							<td id="priority_td_${job.id}" style="width: 80px;" class="minSize">${job.priority!''}</td>
							<td class="minSize">
								<a href="/${orgi}/manage/file/delete.html?keyid=${job.id!''}"><i class="tbControlIcon tci-14" title="删除"></i></a>
							</td>
						</tr> 
						</#list>
						</#if>
					</tbody>
				</table>
			</div>

		</div>
	</div>
</div>
